x86/vvmx: fix VM_EXIT_ACK_INTR_ON_EXIT handling
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 5 Feb 2020 12:50:09 +0000 (13:50 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Feb 2020 12:50:09 +0000 (13:50 +0100)
commita8effbffe586f020e2db400e2c25ae52e36cc1bd
tree001d09c25a36f2b6da4bb786d62889a074d03379
parentf96e1469ad06b61796c60193daaeb9f8a96d7458
x86/vvmx: fix VM_EXIT_ACK_INTR_ON_EXIT handling

When VM_EXIT_ACK_INTR_ON_EXIT is clear in the vmexit control vmcs
register the bit 31 of VM_EXIT_INTR_INFO must be 0, in order to denote
that the field doesn't contain any interrupt information. This is not
currently acknowledged as the field always get filled with valid
interrupt information, regardless of whether VM_EXIT_ACK_INTR_ON_EXIT
is set.

Fix this and only fill VM_EXIT_INTR_INFO when VM_EXIT_ACK_INTR_ON_EXIT
is set. Note that this requires one minor change in
nvmx_update_apicv in order to obtain the interrupt information from
the internal state rather than the nested vmcs register.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c